<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Vue指令v-if</title>
    <script src="js/vue.js"></script>
</head>
<body>

<!--2.编写视图-->
<div id="app">
	<!-- 有四个条件：type值等于A或B或C，则显示"优秀"或"良好"或"及格"或"不及格"所在的div -->
    <div v-if="type=='A'">优秀</div>
    <div v-else-if="type=='B'">良好</div>
    <div v-else-if="type=='C'">及格</div>
    <div v-else>不及格</div>

    <hr/>
    <div v-show="type=='A'">优秀</div>
    <div v-show="type=='B'">良好</div>
    <div v-show="type=='C'">及格</div>
    <div v-show="type=='D'">不及格</div>
</div>

<script>
	
    // 1.创建Vue对象, el找到vue操作的的标签, data是vue中的数据
    new Vue({
        el: "#app",
        data: {
            type: "D"
        }
    });
</script>
</body>
</html>